<?php

/**
 * Profesores form base class.
 *
 * @method Profesores getObject() Returns the current form's model object
 *
 * @package    Fix_Student
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseProfesoresForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'idprofesores' => new sfWidgetFormInputHidden(),
      'cedula'       => new sfWidgetFormInputText(),
      'nombres'      => new sfWidgetFormInputText(),
      'apellidos'    => new sfWidgetFormInputText(),
      'sexo'         => new sfWidgetFormInputText(),
      'direccion'    => new sfWidgetFormInputText(),
      'telefono'     => new sfWidgetFormInputText(),
      'email'        => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'idprofesores' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('idprofesores')), 'empty_value' => $this->getObject()->get('idprofesores'), 'required' => false)),
      'cedula'       => new sfValidatorString(array('max_length' => 11)),
      'nombres'      => new sfValidatorString(array('max_length' => 45)),
      'apellidos'    => new sfValidatorString(array('max_length' => 45)),
      'sexo'         => new sfValidatorString(array('max_length' => 15)),
      'direccion'    => new sfValidatorString(array('max_length' => 80)),
      'telefono'     => new sfValidatorString(array('max_length' => 30)),
      'email'        => new sfValidatorString(array('max_length' => 25)),
    ));

    $this->widgetSchema->setNameFormat('profesores[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Profesores';
  }

}
